package cn.jiyun.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class HelloController {

    @Value("${user.name}")
    private String name;

    @Value("${user.password}")
    private String password;

    @Value("${user.age}")
    private String age;

     @GetMapping("getData")
    public Map<String,String> getData(){
         HashMap<String, String> map = new HashMap<>();
         map.put("name",name);
         map.put("mima",password);
         map.put("age",age);


         return map;
     }
}
